import { MockMethod } from "vite-plugin-mock";

const SELECT_OPTIONS = [
  {
    value: "io_device",
    label: "IO设备",
    children: [
      {
        value: "ADAM4118",
        label: "ADAM 4118",
        title: "研华",
        icon: "",
        description:
          "ADAM-4100系列是通用传感器到计算机的便携式接口模块，专为恶劣环境下的可靠操作而设计。该系列产品具有内置的微处理器,坚固的工业级ABS塑料外壳,可以独立提供智能信号调理、模拟量I/O、数字量I/O和LED数据显示，此外地址模式采用了人性化设计，可以方便地读取模块地址。"
      },
      {
        value: "ADAM4024",
        label: "ADAM 4024",
        title: "研华",
        icon: "https://advdownload.advantech.com.cn/productfile/PIS/ADAM-4024/Product%20-%20Photo(Main)/ADAM-4024_03_S-min20190725103821.jpg",
        description:
          "ADAM-4024提供了4路通用类型的模拟量输出通道。它还带有4路数字量输入，用于一些集成的应用场合，如紧急锁定输出或用户默认的触发等。该模块带有光隔离器，可防止接地回路、电源冲击对设备造成损害。您可以指定转换速率和启动电流。"
      },
      {
        value: "ADAM4150",
        label: "ADAM 4150",
        title: "研华",
        icon: "https://advdownload.advantech.com.cn/productfile/PIS/ADAM-4024/Product%20-%20Photo(Main)/ADAM-4024_03_S-min20190725103821.jpg",
        description: "ADAM4150是研华的15通道数字IO模块"
      }
    ]
  },
  {
    value: "intelligent_device",
    label: "智能设备",
    children: [
      {
        value: "HnwDC1000",
        label: "温控器DC1010",
        title: "霍尼韦尔",
        icon: "",
        description:
          "该产品最大流量可达500ml/min，最高压力可达2MPa，主要应用于实验室分析和制备领域，适合大流量范围内定量输送弱腐蚀性液体的领域。"
      },
      {
        value: "DTS",
        label: "测温主机",
        title: "分布式光纤",
        icon: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
        description: "暂无"
      },
      {
        value: "LORA",
        label: "温湿度传感器",
        title: "LoRa",
        icon: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
        description: "暂无"
      }
    ]
  },
  {
    value: "common_device",
    label: "通用设备(依托IO设备)",
    children: [
      {
        value: "THERMOCOUPLE",
        label: "热电偶",
        icon: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
        description: "热电偶"
      },
      {
        value: "PRESSDUCTOR",
        label: "压力传感器",
        icon: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
        description: "压力传感器"
      },
      {
        value: "VALVE",
        label: "电动阀",
        icon: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
        description: "电动阀"
      },
      {
        value: "SWITCH",
        label: "接近开关",
        icon: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
        description: "接近开关"
      },
      {
        value: "LED",
        label: "指示灯",
        icon: "https://tdesign.gtimg.com/tdesign-pro/t-sec.jpg",
        description: "指示灯"
      }
    ]
  }
];

export default [
  {
    url: "/deviceTypes",
    method: "get",
    response: () => {
      return {
        errorCode: 0,
        message: "",
        data: SELECT_OPTIONS
      };
    }
  }
] as MockMethod[];
